package day6;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class WhileTest {
    public static void main(String[] args) {
        //break结合while,去掉do while
        int a=0;
        Scanner in=new Scanner(System.in);
        while (true){
            a=in.nextInt();
            if(a>=1){
                break;
            }//不需要else
            System.out.println("输入错误！");
        }
        System.out.println("您输入的是："+a);
    }
}
